<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="/template/template.xhtml">
	
	<ui:define name="menu"> 
		<ui:include src="/template/menu_admin.xhtml"/>
	</ui:define>
	
	<ui:define name="conteudo">  
		<h:form>
			<br/>
			<table width="90%" border="1" class="form">
				<caption>${ usuarioMBean.obj.id == 0 ? 'Cadastrar' : 'Alterar'} Usuário</caption>
				<tbody>
					<tr>
						<th>Login:</th>
						<td>
							<h:inputText value="#{ usuarioMBean.obj.username }" />
						</td>
					</tr>
					<tr>
						<th>Senha:</th>
						<td>
							<p:password id="feedback" value="#{ usuarioMBean.obj.password }" feedback="true"/>
						</td>
					</tr>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="2">
							<h:commandButton value="#{ usuarioMBean.obj.id == 0 ? 'Cadastrar' : 'Alterar'}"  action="#{ usuarioMBean.cadastrar }" />
							<h:commandButton value="Cancelar"  action="#{ usuarioMBean.cancelar }" />
						</td>
					</tr>
				</tfoot>
			</table>
			<br />
		</h:form>
	</ui:define>
			
	<ui:define name="rodape">  
		<ui:include src="/template/rodape.xhtml"/> 
	</ui:define>

</ui:composition>